﻿<!--***********************************************************************************

   Extended WPF Toolkit

   Copyright (C) 2007-2013 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license 

   For more features, controls, and fast professional support,
   pick up the Plus Edition at http://xceed.com/wpf_toolkit

   Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

  **********************************************************************************-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Xceed.Wpf.DataGrid"
                    xmlns:markup="clr-namespace:Xceed.Wpf.DataGrid.Markup"
                    xmlns:views="clr-namespace:Xceed.Wpf.DataGrid.Views">

   <ResourceDictionary.MergedDictionaries>
      <!-- Style definitions for specific controls (things that are not grid elements) -->

      <markup:DataGridThemeResourceDictionary Source="/themes/Controls/FixedColumnSplitter.generic.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Controls/TableViewScrollViewer.generic.xaml" />

      <!-- For each specific systeme theme ResourceDictionary, we only need to include 
           the xaml associated to the theme (to make the "BasedOn" work). However, here 
           we have include all xaml theme files of the product to make the forcing of a 
           theme work. And it works because, when the DefaultStyleKey is not found in the 
           specific ResourceDictionary, WPF looks in the generic.xaml ResourceDictionary. 
           That way, we don't have to maintain this list in all the xaml files. -->

      <markup:DataGridThemeResourceDictionary Source="/themes/Aero/TableflowView.Aero.normalcolor.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Aero/TableView.Aero.normalcolor.xaml" />


      <markup:DataGridThemeResourceDictionary Source="/themes/Classic/TableflowView.Classic.systemcolor.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Classic/TableView.Classic.systemcolor.xaml" />


      <markup:DataGridThemeResourceDictionary Source="/themes/Luna/TableflowView.Luna.normalcolor.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Luna/TableView.Luna.normalcolor.xaml" />


      <markup:DataGridThemeResourceDictionary Source="/themes/Luna/TableflowView.Luna.homestead.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Luna/TableView.Luna.homestead.xaml" />


      <markup:DataGridThemeResourceDictionary Source="/themes/Luna/TableflowView.Luna.metallic.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Luna/TableView.Luna.metallic.xaml" />


      <markup:DataGridThemeResourceDictionary Source="/themes/Royale/TableflowView.Royale.normalcolor.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Royale/TableView.Royale.normalcolor.xaml" />


      <markup:DataGridThemeResourceDictionary Source="/themes/Zune/TableflowView.Zune.normalcolor.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Zune/TableView.Zune.normalcolor.xaml" />

      <markup:DataGridThemeResourceDictionary Source="/themes/Windows7/TableflowView.Windows7.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Windows7/TableView.Windows7.xaml" />

      <markup:DataGridThemeResourceDictionary Source="/themes/Aero2/TableflowView.Aero2.normalcolor.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Aero2/TableView.Aero2.normalcolor.xaml" />

   </ResourceDictionary.MergedDictionaries>

   <!-- *******************************************************************************************
   *****  STYLE              TargetType: CheckBox
   ************************************************************************************************
   -->
    <Style TargetType="{x:Type local:DataGridCheckBox}">
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type local:DataGridCheckBox}">
               <CheckBox x:Name="PART_ChildCheckBox"
                         Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Mode=OneWay}"
                         ContentTemplate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ContentTemplate, Mode=OneWay}"
                         ContentTemplateSelector="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ContentTemplateSelector, Mode=OneWay}"
                         Focusable="False"
                         IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked}"
                         IsThreeState="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsThreeState, Mode=OneWay}"
                         AutomationProperties.AutomationId="InnerCheckBox" />
                </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

    <!-- Generic theme for TableView -->

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView}"
          TargetType="views:TableView"
          BasedOn="{StaticResource tableViewLunaNormalColorDefaultValues}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:DataGridControl}"
          TargetType="local:DataGridControl"
          BasedOn="{StaticResource tableViewLunaNormalColorGridControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:RowSelectorPane}"
          TargetType="local:RowSelectorPane"
          BasedOn="{StaticResource tableViewLunaNormalColorRowSelectorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:RowSelector}"
          TargetType="local:RowSelector"
          BasedOn="{StaticResource tableViewLunaNormalColorRowSelectorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:Row}"
          TargetType="local:Row"
          BasedOn="{StaticResource tableViewLunaNormalColorRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:DataRow}"
          TargetType="local:DataRow"
          BasedOn="{StaticResource tableViewLunaNormalColorDataRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:ColumnManagerRow}"
          TargetType="local:ColumnManagerRow"
          BasedOn="{StaticResource tableViewLunaNormalColorColumnManagerRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:Cell}"
          TargetType="local:Cell"
          BasedOn="{StaticResource tableViewLunaNormalColorCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:DataCell}"
          TargetType="local:DataCell"
          BasedOn="{StaticResource tableViewLunaNormalColorDataCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:ColumnManagerCell}"
          TargetType="local:ColumnManagerCell"
          BasedOn="{StaticResource tableViewLunaNormalColorColumnManagerCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupByControl}"
          TargetType="local:GroupByControl"
          BasedOn="{StaticResource tableViewLunaNormalColorGroupByControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupByItem}"
          TargetType="local:GroupByItem"
          BasedOn="{StaticResource tableViewLunaNormalColorGroupByItemStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupHeaderControl}"
          TargetType="local:GroupHeaderControl"
          BasedOn="{StaticResource tableViewLunaNormalColorGroupHeaderControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupLevelIndicator}"
          TargetType="local:GroupLevelIndicator"
          BasedOn="{StaticResource tableViewLunaNormalColorGroupLevelIndicatorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:DetailIndicator}"
          TargetType="local:DetailIndicator"
          BasedOn="{StaticResource tableViewLunaNormalColorDetailIndicatorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupLevelIndicatorPane}"
          TargetType="local:GroupLevelIndicatorPane"
          BasedOn="{StaticResource tableViewLunaNormalColorGroupLevelIndicatorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:HierarchicalGroupLevelIndicatorPane}"
          TargetType="local:HierarchicalGroupLevelIndicatorPane"
          BasedOn="{StaticResource tableViewLunaNormalColorHierarchicalGroupLevelIndicatorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:ScrollTip}"
          TargetType="local:ScrollTip"
          BasedOn="{StaticResource tableViewLunaNormalColorScrollTipStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:HierarchicalGroupByControlNode}"
          TargetType="local:HierarchicalGroupByControlNode"
          BasedOn="{StaticResource tableViewLunaNormalColorHierarchicalGroupByControlNodeStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:HierarchicalGroupByControl}"
          TargetType="local:HierarchicalGroupByControl"
          BasedOn="{StaticResource tableViewLunaNormalColorHierarchicalGroupByControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:HierarchicalGroupByItem}"
          TargetType="local:HierarchicalGroupByItem"
          BasedOn="{StaticResource tableViewLunaNormalColorHierarchicalGroupByItemStyle}" />

   <!-- Generic theme for TableflowView -->

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView}"
          TargetType="views:TableflowView"
          BasedOn="{StaticResource tableflowViewLunaNormalColorDefaultValues}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:DataGridControl}"
          TargetType="local:DataGridControl"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGridControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:RowSelectorPane}"
          TargetType="local:RowSelectorPane"
          BasedOn="{StaticResource tableflowViewLunaNormalColorRowSelectorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:RowSelector}"
          TargetType="local:RowSelector"
          BasedOn="{StaticResource tableflowViewLunaNormalColorRowSelectorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:Row}"
          TargetType="local:Row"
          BasedOn="{StaticResource tableflowViewLunaNormalColorRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:DataRow}"
          TargetType="local:DataRow"
          BasedOn="{StaticResource tableflowViewLunaNormalColorDataRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:ColumnManagerRow}"
          TargetType="local:ColumnManagerRow"
          BasedOn="{StaticResource tableflowViewLunaNormalColorColumnManagerRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:Cell}"
          TargetType="local:Cell"
          BasedOn="{StaticResource tableflowViewLunaNormalColorCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:DataCell}"
          TargetType="local:DataCell"
          BasedOn="{StaticResource tableflowViewLunaNormalColorDataCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:ColumnManagerCell}"
          TargetType="local:ColumnManagerCell"
          BasedOn="{StaticResource tableflowViewLunaNormalColorColumnManagerCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupByControl}"
          TargetType="local:GroupByControl"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGroupByControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupByItem}"
          TargetType="local:GroupByItem"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGroupByItemStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupHeaderControl}"
          TargetType="local:GroupHeaderControl"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGroupHeaderControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupLevelIndicator}"
          TargetType="local:GroupLevelIndicator"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGroupLevelIndicatorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:DetailIndicator}"
          TargetType="local:DetailIndicator"
          BasedOn="{StaticResource tableflowViewLunaNormalColorDetailIndicatorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupLevelIndicatorPane}"
          TargetType="local:GroupLevelIndicatorPane"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGroupLevelIndicatorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:HierarchicalGroupLevelIndicatorPane}"
          TargetType="local:HierarchicalGroupLevelIndicatorPane"
          BasedOn="{StaticResource tableflowViewLunaNormalColorHierarchicalGroupLevelIndicatorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:ScrollTip}"
          TargetType="local:ScrollTip"
          BasedOn="{StaticResource tableflowViewLunaNormalColorScrollTipStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:HierarchicalGroupByControlNode}"
          TargetType="local:HierarchicalGroupByControlNode"
          BasedOn="{StaticResource tableflowViewLunaNormalColorHierarchicalGroupByControlNodeStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:HierarchicalGroupByControl}"
          TargetType="local:HierarchicalGroupByControl"
          BasedOn="{StaticResource tableflowViewLunaNormalColorHierarchicalGroupByControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:HierarchicalGroupByItem}"
          TargetType="local:HierarchicalGroupByItem"
          BasedOn="{StaticResource tableflowViewLunaNormalColorHierarchicalGroupByItemStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupNavigationButton}"
          TargetType="{x:Type local:GroupNavigationButton}"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGroupNavigationButtonStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupNavigationControl}"
          TargetType="{x:Type local:GroupNavigationControl}"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGroupNavigationControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupNavigationControlItem}"
          TargetType="{x:Type local:GroupNavigationControlItem}"
          BasedOn="{StaticResource tableflowViewLunaNormalColorGroupNavigationControlItemStyle}" />

</ResourceDictionary>
